import service from './config'
// import axios from 'axios'

//登录接口
export const login = (username, password) => {
    return service.post('/users/login', { username, password })
}

//获取验证码
export const getCaptcha = () => service.get('/users/getCaptcha')

//校验验证码
export const verifyCaptcha = captcha => service.get(`/users/verifyCaptcha?captcha=${captcha}`)

//获取所有用户
export const getAllUsers = () => service.get('/users/getAllUsers')

//获取权限菜单
export const getMenuList = () => service.get('/permission/getMenuList')

//获取学生数据列表
export const getStudentList = (page = 1, count = 10, classes = '') => service.get('/students/getstulist', {
    params: {
        page,
        count,
        classes
    }
})